<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'solution-form',
	'enableAjaxValidation'=>true,
//	'clientOptions'=>array(
//		'validateOnSubmit'=>true,
//	),
)); ?>
	<div class="row">
		<?php echo $form->hiddenField($model, 'sol_pid', array('value'=>$model->isNewRecord?$_GET['id']:$model->sol_pid));?>
	</div>

	<div class="row">
		<!--style给定宽度可以影响编辑器的最终宽度-->
		<script type="text/plain" id="editor" style="width:100%">
		<?php echo $model->sol_content; ?>
		</script>
        <?php echo $form->hiddenField($model, 'sol_content'); ?>
		<?php echo $form->error($model,'sol_content'); ?>
	</div>

	<div class="row">
		<hr />
		<hr />
		<button class="cupid-green" type="submit" title="<?php echo $model->isNewRecord?'提交':'更新'; ?>"><?php echo $model->isNewRecord?'提交':'更新';?></button>
		<br />
		<?php echo $form->errorSummary($model); ?>
	</div>


<?php $this->endWidget(); ?>

</div><!-- form -->

<?php

$this->widget('ext.editor.ueditor.ueditorWidget', array(
    'id' => 'editor',
    //			'initialContent' => '<span style="color:#ccc">欢迎使用ueditor</span>',
    //			'initialStyle' => 'body{margin:8px;font-family:"宋体";font-size:16px;}',
    'elementPathEnabled' => true,
    'autoFloatEnabled' => false,
    //'topOffset'=>30,
    //编辑器底部距离工具栏高度(如果参数大于等于编辑器高度，则设置无效)
    //'toolbarTopOffset'=>400,
    'minFrameHeight' => 320,
    'initialFrameHeight' => 320,
    // 			'minFrameWidth'=>800,
    'minFrameWidth' => '100%',
    //			'autoClearinitialContent' => true,
    'imagePath' => '/',
    'textarea' => 'content',

    'autoHeightEnabled' => true,
    // 			'toolbars'=>array(array('Undo','Redo','|','ForeColor','BackColor', 'Bold','Italic','Underline','JustifyLeft','JustifyCenter','JustifyRight','InsertImage','ImageNone','ImageLeft','ImageRight','ImageCenter' )),
    ));
?>

<script type="text/javascript">
$(function(){
    $("body").mousemove(function(){
		$("#Solution_sol_content").val(UE.getEditor('editor').getContent());
	});
});
</script>